const express = require("express");
const app = express();

app.use(express.static("./views"));
app.set("view engine" , "ejs");
app.set("views","./views")

const  user={
    username: "alice",
    animal:[
        {name: "小猫", age:12},
        {name: "小鱼", age:17},
        {name: "小狗", age:22},
    ]
}

app.get("/",(req, res) => {
    res.render("ejs",{user:user})
}).listen(80,()=>{
    console.log("服务器启动");
})